package com.manage.pojo.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 费用报销对象 cm_cost_expense
 *
 * @author ruoyi
 * @date 2025-10-05
 */
@Data
@TableName("cm_cost_expense")
public class CmCostExpense
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

    /** 外部唯一id */
    private String publicId;

    /** 报销人id */
    private Long userId;

    /** 科目：0加班工资，1其他费用 */
    private Long subject;

    /** 金额 */
    private BigDecimal amount;

    /** 支付凭证（存附件id列表） */
    private String payVoucher;

    /** 备注 */
    private String remark;

    /** 报销日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date expenseDate;

    /**创建时间*/
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**更新时间*/
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("publicId", getPublicId())
            .append("userId", getUserId())
            .append("subject", getSubject())
            .append("amount", getAmount())
            .append("payVoucher", getPayVoucher())
            .append("remark", getRemark())
            .append("expenseDate", getExpenseDate())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
